#ifndef MAINFRAME_H
#define MAINFRAME_H

//(*Headers(CMainFrame)
#include <wx/menu.h>
#include <wx/frame.h>
#include <wx/statusbr.h>
//*)

//(*wxWidgets includes
#include <wx/infobar.h>
#include <wx/string.h>
#include <wx/arrstr.h>
#include <wx/datetime.h>
//*)

//(* C/C++ includes
#include <ctime>
//*)

//(* other includes
#include "../common/stdafx.h"
#include "version.h"
#include "ErrorLog.h"
#include "Options.h"
#include "LicenseDlg.h"
#include "User.h"
#include "PluginManager.h"
#include "MySql/MySqlEmbeddedWrapper.h"
//*)

//(* defines
//*)

//(* constants
//*)

class CAccountManager;

class CMainFrame: public wxFrame
{
public:
	CMainFrame(wxWindow* parent);
	virtual ~CMainFrame();
	CAccountPlugin* GetAccountPlugin(const wxString& PluginName);
	bool GetAvailableAccountTypes(wxArrayString& AccountTypes);

	//(*Handlers(CMainFrame)
	void OnClose(wxCloseEvent& event);
	void OnMenuFileExitSelected(wxCommandEvent& event);
	void OnMenuHelpAboutSelected(wxCommandEvent& event);
	void OnMenuHelpHelpSelected(wxCommandEvent& event);
	void OnMenuAccountsNewSelected(wxCommandEvent& event);
	void OnMenuAccountsDeleteSelected(wxCommandEvent& event);
	void OnMenuHelpLicenseSelected(wxCommandEvent& event);
	void OnMenuEditOptionsSelected(wxCommandEvent& event);
	void OnMenuUsersAddSelected(wxCommandEvent& event);
	void OnMenuUsersSwitchSelected(wxCommandEvent& event);
	void OnMenuUsersDeleteSelected(wxCommandEvent& event);
	//*)

protected:
	//(*Identifiers(CMainFrame)
	//*)

private:
    bool LoadData();

	//(*Declarations(CMainFrame)
	wxMenu* Menu3;
	wxMenu* Menu1;
	wxMenu* Menu7;
	wxStatusBar* StatusBar1;
	wxMenuBar* MenuBar1;
	wxMenu* Menu6;
	wxMenu* Menu2;
	wxMenu* Menu5;
	wxMenu* Menu4;
	//*)

    wxInfoBar*                         m_pInfoBar;
    CMySqlWrapper*                     m_pMySql;
    CPluginManager                     m_PluginManager;
    CUsers                             m_Users;
    CAccountManager*                   m_pAccountManger;
    std::map<int, wxString>            m_TransactionTypes;
    std::map<int, wxString>            m_StatusTypes;
    std::map<int, wxString>            m_OccuranceTypes;
    wxArrayString                      m_PayeeList;
    std::map<wxString, wxArrayString>  m_CategoryList;

	DECLARE_EVENT_TABLE()
};

#endif
